// JavaScript Document

var breatheInterval;

function breathe_prefetch() {

	$.mobile.loadPage( "info.html" );
}

function toggleBreathing() {

	if ($("#breatheToggle").text() == "Start") {
		breatheInterval = setInterval(breatheDraw, 60);
		$("#breatheToggle .ui-btn-text").html("Stop");
	}
	else {
		clearInterval(breatheInterval);
		breatheCtx.fillStyle = "#EFEB8F";
		breatheCtx.fillRect(0,0,breatheWidth,breatheHeight);
		$("#breatheToggle .ui-btn-text").text("Start");
	}
}

